SWPTLS\AI\AIProvider S

Total Complexity 45
Dependencies 2
Dependents 1
Total lines 351
Lines of code 150
Logical lines of code 85
Comment lines 142
Methods 21
Properties 0

Methods 21

Method Rating Maintainability Complexity Lines of code
format_table_for_ai()
B
36 20 71
truncate_to_tokens()
S
58 4 16
handle_api_response()
S
57 3 17
get_system_prompt()
S
64 1 14
get_provider_name()
S
100 1 0
get_provider_display_name()
S
100 1 0
get_available_models()
S
100 1 0
get_default_model()
S
100 1 0
get_settings_schema()
S
100 1 0
validate_credentials()
S
100 1 0
test_connection()
S
100 1 0
generate_response()
S
100 1 0
get_api_endpoint()
S
100 1 0
get_api_timeout()
S
82 1 3
estimate_tokens()
S
79 1 3
get_saved_credentials()
S
70 1 6
get_saved_options()
S
64 1 9
build_request_headers()
S
74 1 5
extract_error_message()
S
100 1 0
get_user_prompt_template()
S
82 1 3
log_api_usage()
S
79 1 3